home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Libris Britannia 4
/
science library(b).zip
/
science library(b)
/
PROGRAMM
/
DB_CLIPP
/
0669.ZIP
/
DECRYPT.PRG
< prev
next >
Wrap
Text File
|
1985-12-30
|
768b
|
20 lines
* PROGRAM...DECRYPT.PRG
* AUTHOR....MIKE COTICCHIO
* NOTES.....Procedure to decrypt encrypted passwords
parameters newword,oldword
store len(newword) to loopcnt,decodekey
store 0 to currletter
store space(1) to oldword
**** This section simply reverses what was done in ENCRYPT.PRG ****
**** The coding key is a value equal to the length of the password ****
**** which is now subtracted from the parsed characters to return ****
**** the original character ****
do while currletter < loopcnt
currletter = currletter+1
store asc(substr(newword,currletter)) - decodekey to newletter
oldword = trim(oldword) + chr(newletter)
enddo
return